package com.itheima.utils;

/**
 * @author Tang
 * @date 2023/4/12
 */
public class BaseContext {
    public static final ThreadLocal THREAD_LOCAL_ID = new ThreadLocal();

    //设置id
    public static void setValue(Long id){
        THREAD_LOCAL_ID.set(id);
    }

    //获取id
    public static Long getValue(){
        return (Long) THREAD_LOCAL_ID.get();
    }
}
